<form name="submitEditForm" class="form-horizontal" novalidate>
    <div style="height:400px;width:600px;overflow-y:auto;overflow-x:hidden;">
        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label">主题<em class="c-red"> *</em></span>

            <div class="col-sm-10">
                <input ng-model="data.banner.title" class="input-text" type="text"
                       required maxlength="50" name="title" placeholder="主题，限制在50个字符内"/>
                <span role="alert"
                      ng-show="(submitEditForm.$submitted || submitEditForm.title.$touched) && submitEditForm.title.$error.required"
                      class="error ng-hide c-red lh30">主题不能为空</span>
                <span role="alert"
                      ng-show="(submitEditForm.$submitted || submitEditForm.title.$touched) && submitEditForm.title.$error.maxlength"
                      class="error ng-hide c-red lh30">主题长度不能超过50个字符</span>
            </div>
        </div>

        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label">图文地址</span>

            <div class="col-sm-10">
                <input ng-model="data.banner.jump_url" class="input-text" type="text"
                       placeholder="链接地址，如:http://www.baidu.com"/>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label">显示顺序<em class="c-red"> *</em></span>

            <div class="col-sm-10">
                <input ng-model="data.banner.order_by" class="input-text" type="number" name="order_by"
                       placeholder="显示顺序" required number/>
                <span role="alert"
                      ng-show="(submitEditForm.$submitted || submitEditForm.order_by.$touched) && submitEditForm.order_by.$error.required"
                      class="error ng-hide c-red lh30">显示顺序不能为空</span>
                <span role="alert"
                      ng-show="(submitEditForm.$submitted || submitEditForm.order_by.$touched) && submitEditForm.order_by.$error.number"
                      class="error ng-hide c-red lh30">显示顺序必须为数值类型</span>
            </div>
        </div>
        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label">是否启用<em class="c-red"> *</em></span>

            <div class="col-sm-10">
                <div ng-switch ng-model="data.banner.publish_status"></div>
            </div>
        </div>

        <div class="form-group mt10 clearfix">
            <span class="col-sm-2 control-label">上传图片<em class="c-red"> *</em></span>

            <div class="col-sm-10">
                <div id="js_logo_wrap" class="side-company" style="height: 125px;border:1px dashed #e0e0e0">
                    <img ng-src="{{preview||data.banner.img_url}}" >
                </div>
                <span role="alert"
                      ng-show="(submitEditForm.$submitted || submitEditForm.img_url.$touched) && submitEditForm.img_url.$error.required"
                      class="error ng-hide c-red lh30">图片不能为空</span>
                <p class="c-gray" style="clear:both;">推荐尺寸610像素*320像素,文件大小不超过100kb,支持jpg、png格式图片</p>
                <div ui-uploader is-image auto-upload ng-model="data.banner.img_url" style="clear: both;"
                     state="uploader.state"
                     thumbnail="preview" required name="img_url"
                     on-status-changed="uploadImages($data)"
                     extensions="jpg,png" maxfilesize="100kb"></div>
                <div class="img-state ng-hide" ng-bind="uploader.state"
                     ng-show="!!uploader.state"></div>

            </div>

        </div>


    </div>
</form>

